package org.fhawk.tinyspring.core.support;

/**
 * Created by tuo on 8/17/2016.
 */
public class SupperClassTemplate extends ClassTemplate {

    private final Class<?> superClass;

    public SupperClassTemplate(String basePackage, Class<?> superClass) {
        super(basePackage);
        this.superClass = superClass;
    }

    @Override
    public boolean checkAddClass(Class<?> cls) {
        return superClass.isAssignableFrom(cls) && superClass != cls;
    }
}
